#include <stdio.h>
#include <sys/types.h>
//#include <iostream>
#include <dirent.h>
 
int main( int argc, const char* argv[] )
{
	if(argc < 2) {
		printf("usage: status source_path\n");
		return;
	}
	struct dirent *entry;
	const char *source = argv[1];
	DIR *dir = opendir(source);
	if(dir == NULL) perror("Can't read directory");
	else {
		while(entry = readdir(dir)) {
			printf("%s\n", entry->d_name);
		}
		closedir(dir);
	}
}
